package com.huang.auth.converter;

import com.huang.auth.entity.po.AuthRolePO;
import com.huang.auth.entity.vo.AuthRoleSimpleVO;
import com.huang.base.core.BaseConvertor;
import org.springframework.stereotype.Component;

/**
 * 简单角色Vo转换
 */
@Component
public class AuthRoleSimpleVOConverter extends BaseConvertor<AuthRolePO, AuthRoleSimpleVO> {

    @Override
    public AuthRoleSimpleVO doConvert(AuthRolePO m) {
        AuthRoleSimpleVO authRoleSimpleVO = new AuthRoleSimpleVO();
        authRoleSimpleVO.setCode(m.getCode());
        authRoleSimpleVO.setId(m.getId().toString());
        authRoleSimpleVO.setName(m.getName());
        return authRoleSimpleVO;
    }
}
